<template>
	<view class="mask">
		<!-- 更新 -->
		<upgrade-popup @close="closeUpgrade" @downloadSuccess="downloadSuccess"></upgrade-popup>
	</view>
</template>

<script>
	import upgradePopup from "@/components/base/upgrade-popup.vue"
	import { postDownSucessInfo } from '@/api/platform/common.js'
	
	export default {
		components: {
			upgradePopup
		},
		data() {
			return {
				
			}
		},
		methods: {
			closeUpgrade() {
				uni.navigateBack()
			},
			downloadSuccess() {
				let latestVersion = uni.getStorageSync("latestVersion")
				latestVersion.updateUser = uni.getStorageSync("userId")
				postDownSucessInfo(latestVersion)
			},
		}
	}
</script>

<style>
	page {
		background: transparent;
	}

	.mask {
		position: fixed;
		left: 0;
		top: 0;
		right: 0;
		bottom: 0;
		/* #ifndef APP-NVUE */
		display: flex;
		/* #endif */
		justify-content: center;
		align-items: center;
		background-color: rgba(0, 0, 0, 0.4);
	}
</style>